{% extends "base.html" %}
{% block title %}借阅卡详情{% endblock %}
{% block content %}
<h2>欢迎{{current_user.username}}来到图书管理系统，您的角色为{{get_current_role()}}</h2>

<h3>请对借书证信息进行审核</h3>
<form method="POST" action="{{ url_for('card_manage.card_approval', user_id=user.id) }}">
    {{ form.hidden_tag() }}
    <p>
        <ul>
            <li>用户名: {{ user.username }}</li>
            <li>年龄: {{ user.age }}</li>
            <li>性别: {{ user.gender }}</li>
            <li>生日: {{ user.birthday }}</li>
            <li>身份证号码: {{ user.user_idcard }}</li>
            <li>手机号: {{ user.user_phone }}</li>
        </ul>
    </p>
    <p>
        <input type="hidden" id="user_id" name="user_id" value="{{ form.user_id.data }}" readonly>
    </p>
    <p>
        {{ form.card_id.label }}<br>
        {{ form.card_id(size=32) }}
        {% for error in form.card_id.errors %}
            <span style="color: red;">[{{ error }}]</span>
        {% endfor %}
    </p>
    <p>
        {{ form.valid_until.label }}<br>
        {{ form.valid_until() }}
        {% for error in form.valid_until.errors %}
            <span style="color: red;">[{{ error }}]</span>
        {% endfor %}
    </p>
    <p>
        {{ form.borrow_limit.label }}<br>
        {{ form.borrow_limit() }}
        {% for error in form.borrow_limit.errors %}
            <span style="color: red;">[{{ error }}]</span>
        {% endfor %}
    </p>
    <p>{{ form.submit() }}</p>
</form>

<a href="{{ url_for('book_manage.book_list') }}">返回书籍列表</a>
{% endblock %}
